package com.ecoolex.union.pay.retailer.api.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

import com.ecoolex.framework.modularize.api.auth.AuthorityRegister;
import com.ecoolex.framework.modularize.api.auth.admin.AdminMemberAuthorityManager;
import com.ecoolex.framework.modularize.api.auth.platform.PlatformMemberAuthorityManager;
import com.ecoolex.framework.modularize.api.auth.user.ConsumerMemberAuthorityManager;
import com.ecoolex.framework.modularize.api.auth.AuthorityRegister;
import com.ecoolex.framework.modularize.api.service.config.SystemConfig;

import com.ecoolex.union.pay.retailer.api.core.ApiConstant;

@Profile(ApiConstant.PROJECT_API_NAME)
@Configuration
public class UnionPayRetailerApiInitializer {

	/**
	 * 系统配置注册
	 * @param config
	 */
	@Autowired
	public void registerSystemConfig(SystemConfig config) {
//		config.register(ApiConstant.CONFIG_ENABLE_USER_REGISTER, "true", "启用用户注册页面", ApiConstant.PROJECT_API_NAME);
	}

	/**
	 * 权限注册
	 */
	@Autowired
	public void registerUserAuth(ConsumerMemberAuthorityManager authorityManager) {
		// 子项目模块注册
	//	AuthorityRegister register = new AuthorityRegister();
	//	register.setParentKey(Constant.AUTH_MODULE_KEY);
	//	register.setKey(ApiConstant.AUTH_PROJECT_KEY);
	//	register.setName(ApiConstant.AUTH_PROJECT_NAME);
	//	register.setRemark(ApiConstant.AUTH_PROJECT_REMARK);
	
	//	authorityManager.register(register);
	}
}
